non compos mentis

(Lat) adj (leg) sio na akili timamu; (colloq) liochanganyikiwa.